<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <style>
    * {
      margin: 0;
      padding: 0;
    }
    .box {
      width: 100%;
      height: 400px;
    }
  </style>
  <body>
    <div class="box"></div>
  </body>
  <script src="https://cdn.bootcdn.net/ajax/libs/echarts/5.1.2/echarts.js"></script>
  <script>
    // 基于准备好的dom，初始化echarts实例
    let dom = document.querySelector(".box");
    //创建实例
    let myCharts = echarts.init(dom);
    myCharts.setOption({
      title: {
        text: "一个坐标系",
      },
      xAxis: {
          //点与点之间距离更合理化
          type:'category'
      },
      yAxis: {},
      series: [
        {
          type: "scatter",
          //散点图的数据是二维数组
          data: [
              [10,20],
              [13,66],
              [50,9],
              [44,22],
              [15,9]
          ],
        }
      ],
    });
  </script>
</html>
